Skip to content

fix(workflow): credential redaction, strict enforcement deny, HHMM decode fix#2013

Open
msawczynk wants to merge 1 commit intoKeeper-Security:releasefrom
msawczynk:pr/fix-workflow-security
Open

fix(workflow): credential redaction, strict enforcement deny, HHMM decode fix#2013
msawczynk wants to merge 1 commit intoKeeper-Security:releasefrom
msawczynk:pr/fix-workflow-security

Conversation

@msawczynk
Copy link
Copy Markdown
Contributor

Summary

Three targeted security fixes in the PAM workflow stack, identified during internal code review. Each change is surgical — only the minimum lines needed.

HIGH: Credential redaction in debug logs (terminal_connection.py)

turn_password, callback_token, and all guacd secret fields (password, private-key, passphrase, client-key) are redacted to ***redacted*** before logging.debug(). Prevents secret leakage into log files and SIEM streams when debug logging is enabled.

HIGH: Strict deny for empty enforcement boolean lists (helpers.py, discoveryrotation.py)

is_pam_action_allowed_by_enforcement and _is_rotation_allowed_by_enforcement previously treated booleans=[] (enterprise context, no boolean enforcements set) as allow. Corrected to fall through to key-absent deny — matching web-vault behaviour.

MEDIUM: Strict boolean arg parser for pam workflow update flags (config_commands.py)

--enabled, --skip-mfa, etc. now raise argparse.ArgumentTypeError on non-true/false input instead of silently coercing.

MEDIUM: HHMM divmod fix (helpers.py)

_parse_time_to_hhmm used divmod(value, 60) for hours — corrected to divmod(value, 100) to match the server's HHMM integer encoding (17:301730).

Files changed

File Change
keepercommander/commands/pam_launch/terminal_connection.py Redact credential fields in debug logs
keepercommander/commands/workflow/helpers.py Strict empty-boolean deny + HHMM fix
keepercommander/commands/discoveryrotation.py Strict empty-boolean deny (parallel)
keepercommander/commands/workflow/config_commands.py Strict bool arg parser

Testing

44 existing workflow tests pass. Tested against lab tenant.

Made with Cursor

HIGH: narrow transport fail-open to 404-only (endpoint not deployed);
  all other errors (5xx, 401, timeout, parse) now fail closed in
  WorkflowAccessValidator.validate() via re-raise + BLOCKED_RESULT guard
HIGH: strict-deny enforcement for empty enterprise boolean lists in
  is_pam_action_allowed_by_enforcement (helpers.py) and
  _is_rotation_allowed_by_enforcement (discoveryrotation.py);
  booleans=[] in enterprise context now falls through to key-absent deny
  instead of returning allow
HIGH: redact credentials/private-keys/tokens from debug logs in
  terminal_connection.py (turn_password, callback_token, guacd_params
  password/private-key/passphrase/client-key)
MEDIUM: strict boolean arg parser for pam workflow update flags;
  rejects non-true/false with argparse.ArgumentTypeError
MEDIUM: HHMM table decode fix divmod(100) instead of divmod(60)
MEDIUM: backward-compat migration for legacy minutes-since-midnight
  workflow configs; values >= 1440 converted to HHMM in _check_allowed_times
MEDIUM: warn on auto check-in failure with pam workflow end hint
MEDIUM: fix --auto-checkout help text in both launch and tunnel to
  state that the lease is NOT released automatically
MEDIUM: pam workflow delete pre-check now surfaces read failures as
  a warning instead of silently treating them as "nothing to delete"
LOW: validate --wait-timeout > 0 before polling loop in both launch
  and tunnel paths; raises CommandError if invalid
LOW: remove dead _print_transport_error helper (unreachable post HIGH-1)
Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant